<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">System.Console.Haskeline.Command</span><span class="hs-special">(</span><span>
</span><span id="line-2"></span><span>                        </span><span class="annot"><span class="hs-comment">-- * Commands</span></span><span>
</span><span id="line-3"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Effect"><span class="hs-identifier">Effect</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-4"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier">KeyMap</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span>
</span><span id="line-5"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier">CmdM</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-6"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier">Command</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-7"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyCommand"><span class="hs-identifier">KeyCommand</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-8"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyConsumed"><span class="hs-identifier">KeyConsumed</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-9"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#withoutConsuming"><span class="hs-identifier">withoutConsuming</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-10"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#keyCommand"><span class="hs-identifier">keyCommand</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#%3E%7C%3E"><span class="hs-operator">(&gt;|&gt;)</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#%3E%2B%3E"><span class="hs-operator">(&gt;+&gt;)</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#try"><span class="hs-identifier">try</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#effect"><span class="hs-identifier">effect</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#clearScreenCmd"><span class="hs-identifier">clearScreenCmd</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#finish"><span class="hs-identifier">finish</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#failCmd"><span class="hs-identifier">failCmd</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#simpleCommand"><span class="hs-identifier">simpleCommand</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#charCommand"><span class="hs-identifier">charCommand</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#setState"><span class="hs-identifier">setState</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#change"><span class="hs-identifier">change</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#changeFromChar"><span class="hs-identifier">changeFromChar</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#%2B%3E"><span class="hs-operator">(+&gt;)</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#useChar"><span class="hs-identifier">useChar</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#choiceCmd"><span class="hs-identifier">choiceCmd</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#keyChoiceCmd"><span class="hs-identifier">keyChoiceCmd</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#keyChoiceCmdM"><span class="hs-identifier">keyChoiceCmdM</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>                        </span><span class="annot"><a href="System.Console.Haskeline.Command.html#doBefore"><span class="hs-identifier">doBefore</span></a></span><span>
</span><span id="line-29"></span><span>                        </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Char.html#"><span class="hs-identifier">Data.Char</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Unicode.html#isPrint"><span class="hs-identifier">isPrint</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Applicative.html#"><span class="hs-identifier">Control.Applicative</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier">Applicative</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier">ap</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#mplus"><span class="hs-identifier">mplus</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier">liftM</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Class.html#"><span class="hs-identifier">Control.Monad.Trans.Class</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.Console.Haskeline.LineState.html"><span class="hs-identifier">System.Console.Haskeline.LineState</span></a></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Key.html"><span class="hs-identifier">System.Console.Haskeline.Key</span></a></span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="hs-keyword">data</span><span> </span><span id="Effect"><span class="annot"><a href="System.Console.Haskeline.Command.html#Effect"><span class="hs-identifier hs-var">Effect</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="LineChange"><span class="annot"><a href="System.Console.Haskeline.Command.html#LineChange"><span class="hs-identifier hs-var">LineChange</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.LineState.html#Prefix"><span class="hs-identifier hs-type">Prefix</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.LineState.html#LineChars"><span class="hs-identifier hs-type">LineChars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-39"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="PrintLines"><span class="annot"><a href="System.Console.Haskeline.Command.html#PrintLines"><span class="hs-identifier hs-var">PrintLines</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-40"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="ClearScreen"><span class="annot"><a href="System.Console.Haskeline.Command.html#ClearScreen"><span class="hs-identifier hs-var">ClearScreen</span></a></span></span><span>
</span><span id="line-41"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="RingBell"><span class="annot"><a href="System.Console.Haskeline.Command.html#RingBell"><span class="hs-identifier hs-var">RingBell</span></a></span></span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span id="local-6989586621679092335"><span class="annot"><a href="System.Console.Haskeline.Command.html#lineChange"><span class="hs-identifier hs-type">lineChange</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.LineState.html#LineState"><span class="hs-identifier hs-type">LineState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092335"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092335"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Effect"><span class="hs-identifier hs-type">Effect</span></a></span></span><span>
</span><span id="line-44"></span><span id="lineChange"><span class="annot"><span class="annottext">lineChange :: forall s. LineState s =&gt; s -&gt; Effect
</span><a href="System.Console.Haskeline.Command.html#lineChange"><span class="hs-identifier hs-var hs-var">lineChange</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Prefix -&gt; LineChars) -&gt; Effect
</span><a href="System.Console.Haskeline.Command.html#LineChange"><span class="hs-identifier hs-var">LineChange</span></a></span><span> </span><span class="annot"><span class="annottext">((Prefix -&gt; LineChars) -&gt; Effect)
-&gt; (s -&gt; Prefix -&gt; LineChars) -&gt; s -&gt; Effect
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Prefix -&gt; s -&gt; LineChars) -&gt; s -&gt; Prefix -&gt; LineChars
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">Prefix -&gt; s -&gt; LineChars
forall s. LineState s =&gt; Prefix -&gt; s -&gt; LineChars
</span><a href="System.Console.Haskeline.LineState.html#lineChars"><span class="hs-identifier hs-var">lineChars</span></a></span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span class="hs-keyword">data</span><span> </span><span id="KeyMap"><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-var">KeyMap</span></a></span></span><span> </span><span id="local-6989586621679092322"><span class="annot"><a href="#local-6989586621679092322"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="KeyMap"><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-var">KeyMap</span></a></span></span><span> </span><span class="hs-special">{</span><span id="lookupKM"><span class="annot"><span class="annottext">forall a. KeyMap a -&gt; Key -&gt; Maybe (KeyConsumed a)
</span><a href="System.Console.Haskeline.Command.html#lookupKM"><span class="hs-identifier hs-var hs-var">lookupKM</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Key.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyConsumed"><span class="hs-identifier hs-type">KeyConsumed</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092322"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">}</span><span>
</span><span id="line-47"></span><span>
</span><span id="line-48"></span><span class="hs-keyword">data</span><span> </span><span id="KeyConsumed"><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyConsumed"><span class="hs-identifier hs-var">KeyConsumed</span></a></span></span><span> </span><span id="local-6989586621679092307"><span class="annot"><a href="#local-6989586621679092307"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="NotConsumed"><span class="annot"><a href="System.Console.Haskeline.Command.html#NotConsumed"><span class="hs-identifier hs-var">NotConsumed</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621679092307"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="Consumed"><span class="annot"><a href="System.Console.Haskeline.Command.html#Consumed"><span class="hs-identifier hs-var">Consumed</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621679092307"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679092092"><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-type">KeyMap</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-51"></span><span>    </span><span id="local-6989586621679092087"><span class="annot"><span class="annottext">fmap :: forall a b. (a -&gt; b) -&gt; KeyMap a -&gt; KeyMap b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var hs-var hs-var hs-var">fmap</span></a></span></span><span> </span><span id="local-6989586621679092086"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679092086"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679092085"><span class="annot"><span class="annottext">KeyMap a
</span><a href="#local-6989586621679092085"><span class="hs-identifier hs-var">km</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Key -&gt; Maybe (KeyConsumed b)) -&gt; KeyMap b
forall a. (Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a
</span><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-var">KeyMap</span></a></span><span> </span><span class="annot"><span class="annottext">((Key -&gt; Maybe (KeyConsumed b)) -&gt; KeyMap b)
-&gt; (Key -&gt; Maybe (KeyConsumed b)) -&gt; KeyMap b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(KeyConsumed a -&gt; KeyConsumed b)
-&gt; Maybe (KeyConsumed a) -&gt; Maybe (KeyConsumed b)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; KeyConsumed a -&gt; KeyConsumed b
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679092086"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe (KeyConsumed a) -&gt; Maybe (KeyConsumed b))
-&gt; (Key -&gt; Maybe (KeyConsumed a)) -&gt; Key -&gt; Maybe (KeyConsumed b)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">KeyMap a -&gt; Key -&gt; Maybe (KeyConsumed a)
forall a. KeyMap a -&gt; Key -&gt; Maybe (KeyConsumed a)
</span><a href="System.Console.Haskeline.Command.html#lookupKM"><span class="hs-identifier hs-var hs-var">lookupKM</span></a></span><span> </span><span class="annot"><span class="annottext">KeyMap a
</span><a href="#local-6989586621679092085"><span class="hs-identifier hs-var">km</span></a></span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679092082"><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyConsumed"><span class="hs-identifier hs-type">KeyConsumed</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-54"></span><span>    </span><span id="local-6989586621679092081"><span class="annot"><span class="annottext">fmap :: forall a b. (a -&gt; b) -&gt; KeyConsumed a -&gt; KeyConsumed b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var hs-var hs-var hs-var">fmap</span></a></span></span><span> </span><span id="local-6989586621679092080"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679092080"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.html#NotConsumed"><span class="hs-identifier hs-type">NotConsumed</span></a></span><span> </span><span id="local-6989586621679092079"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679092079"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">b -&gt; KeyConsumed b
forall a. a -&gt; KeyConsumed a
</span><a href="System.Console.Haskeline.Command.html#NotConsumed"><span class="hs-identifier hs-var">NotConsumed</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679092080"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679092079"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-55"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span id="local-6989586621679092078"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679092078"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.html#Consumed"><span class="hs-identifier hs-type">Consumed</span></a></span><span> </span><span id="local-6989586621679092077"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679092077"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">b -&gt; KeyConsumed b
forall a. a -&gt; KeyConsumed a
</span><a href="System.Console.Haskeline.Command.html#Consumed"><span class="hs-identifier hs-var">Consumed</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679092078"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679092077"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span class="hs-keyword">data</span><span> </span><span id="CmdM"><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-var">CmdM</span></a></span></span><span> </span><span id="local-6989586621679092285"><span class="annot"><a href="#local-6989586621679092285"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span id="local-6989586621679092286"><span class="annot"><a href="#local-6989586621679092286"><span class="hs-identifier hs-type">a</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span id="GetKey"><span class="annot"><a href="System.Console.Haskeline.Command.html#GetKey"><span class="hs-identifier hs-var">GetKey</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-type">KeyMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-type">CmdM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092285"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092286"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-59"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="DoEffect"><span class="annot"><a href="System.Console.Haskeline.Command.html#DoEffect"><span class="hs-identifier hs-var">DoEffect</span></a></span></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Effect"><span class="hs-identifier hs-type">Effect</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-type">CmdM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092285"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092286"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-60"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="CmdM"><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-var">CmdM</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679092285"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-type">CmdM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092285"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092286"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="Result"><span class="annot"><a href="System.Console.Haskeline.Command.html#Result"><span class="hs-identifier hs-var">Result</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621679092286"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span class="hs-keyword">type</span><span> </span><span id="Command"><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-var">Command</span></a></span></span><span> </span><span id="local-6989586621679092072"><span class="annot"><a href="#local-6989586621679092072"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span id="local-6989586621679092071"><span class="annot"><a href="#local-6989586621679092071"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span id="local-6989586621679092070"><span class="annot"><a href="#local-6989586621679092070"><span class="hs-identifier hs-type">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="#local-6989586621679092071"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-type">CmdM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092072"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092070"><span class="hs-identifier hs-type">t</span></a></span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span id="local-6989586621679092306"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679092067"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092306"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-type">CmdM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092306"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-66"></span><span>    </span><span id="local-6989586621679092065"><span class="annot"><span class="annottext">fmap :: forall a b. (a -&gt; b) -&gt; CmdM m a -&gt; CmdM m b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var hs-var hs-var hs-var">fmap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; CmdM m a -&gt; CmdM m b
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span></span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span id="local-6989586621679092288"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679092055"><span id="local-6989586621679092057"><span id="local-6989586621679092059"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092288"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-type">CmdM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092288"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-69"></span><span>    </span><span id="local-6989586621679092053"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; CmdM m a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; CmdM m a
forall (m :: * -&gt; *) a. a -&gt; CmdM m a
</span><a href="System.Console.Haskeline.Command.html#Result"><span class="hs-identifier hs-var">Result</span></a></span><span>
</span><span id="line-70"></span><span>    </span><span id="local-6989586621679092051"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. CmdM m (a -&gt; b) -&gt; CmdM m a -&gt; CmdM m b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;*&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmdM m (a -&gt; b) -&gt; CmdM m a -&gt; CmdM m b
forall (m :: * -&gt; *) a b. Monad m =&gt; m (a -&gt; b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier hs-var">ap</span></a></span></span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span id="local-6989586621679092305"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679092046"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092305"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-type">CmdM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092305"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-73"></span><span>    </span><span id="local-6989586621679092042"><span class="annot"><span class="annottext">return :: forall a. a -&gt; CmdM m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var hs-var hs-var hs-var">return</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; CmdM m a
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span>    </span><span class="annot"><a href="System.Console.Haskeline.Command.html#GetKey"><span class="hs-identifier hs-type">GetKey</span></a></span><span> </span><span id="local-6989586621679092036"><span class="annot"><span class="annottext">KeyMap (CmdM m a)
</span><a href="#local-6989586621679092036"><span class="hs-identifier hs-var">km</span></a></span></span><span> </span><span id="local-6989586621679092035"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. CmdM m a -&gt; (a -&gt; CmdM m b) -&gt; CmdM m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span id="local-6989586621679092034"><span class="annot"><span class="annottext">a -&gt; CmdM m b
</span><a href="#local-6989586621679092034"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">KeyMap (CmdM m b) -&gt; CmdM m b
forall (m :: * -&gt; *) a. KeyMap (CmdM m a) -&gt; CmdM m a
</span><a href="System.Console.Haskeline.Command.html#GetKey"><span class="hs-identifier hs-var">GetKey</span></a></span><span> </span><span class="annot"><span class="annottext">(KeyMap (CmdM m b) -&gt; CmdM m b) -&gt; KeyMap (CmdM m b) -&gt; CmdM m b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(CmdM m a -&gt; CmdM m b) -&gt; KeyMap (CmdM m a) -&gt; KeyMap (CmdM m b)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmdM m a -&gt; (a -&gt; CmdM m b) -&gt; CmdM m b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; CmdM m b
</span><a href="#local-6989586621679092034"><span class="hs-identifier hs-var">g</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">KeyMap (CmdM m a)
</span><a href="#local-6989586621679092036"><span class="hs-identifier hs-var">km</span></a></span><span>
</span><span id="line-76"></span><span>    </span><span class="annot"><a href="System.Console.Haskeline.Command.html#DoEffect"><span class="hs-identifier hs-type">DoEffect</span></a></span><span> </span><span id="local-6989586621679092033"><span class="annot"><span class="annottext">Effect
</span><a href="#local-6989586621679092033"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621679092032"><span class="annot"><span class="annottext">CmdM m a
</span><a href="#local-6989586621679092032"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span id="local-6989586621679092031"><span class="annot"><span class="annottext">a -&gt; CmdM m b
</span><a href="#local-6989586621679092031"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Effect -&gt; CmdM m b -&gt; CmdM m b
forall (m :: * -&gt; *) a. Effect -&gt; CmdM m a -&gt; CmdM m a
</span><a href="System.Console.Haskeline.Command.html#DoEffect"><span class="hs-identifier hs-var">DoEffect</span></a></span><span> </span><span class="annot"><span class="annottext">Effect
</span><a href="#local-6989586621679092033"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmdM m a
</span><a href="#local-6989586621679092032"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CmdM m a -&gt; (a -&gt; CmdM m b) -&gt; CmdM m b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; CmdM m b
</span><a href="#local-6989586621679092031"><span class="hs-identifier hs-var">g</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-77"></span><span>    </span><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-type">CmdM</span></a></span><span> </span><span id="local-6989586621679092030"><span class="annot"><span class="annottext">m (CmdM m a)
</span><a href="#local-6989586621679092030"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span id="local-6989586621679092029"><span class="annot"><span class="annottext">a -&gt; CmdM m b
</span><a href="#local-6989586621679092029"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (CmdM m b) -&gt; CmdM m b
forall (m :: * -&gt; *) a. m (CmdM m a) -&gt; CmdM m a
</span><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-var">CmdM</span></a></span><span> </span><span class="annot"><span class="annottext">(m (CmdM m b) -&gt; CmdM m b) -&gt; m (CmdM m b) -&gt; CmdM m b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(CmdM m a -&gt; CmdM m b) -&gt; m (CmdM m a) -&gt; m (CmdM m b)
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmdM m a -&gt; (a -&gt; CmdM m b) -&gt; CmdM m b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; CmdM m b
</span><a href="#local-6989586621679092029"><span class="hs-identifier hs-var">g</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">m (CmdM m a)
</span><a href="#local-6989586621679092030"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-78"></span><span>    </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Result"><span class="hs-identifier hs-type">Result</span></a></span><span> </span><span id="local-6989586621679092028"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679092028"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span id="local-6989586621679092027"><span class="annot"><span class="annottext">a -&gt; CmdM m b
</span><a href="#local-6989586621679092027"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; CmdM m b
</span><a href="#local-6989586621679092027"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679092028"><span class="hs-identifier hs-var">x</span></a></span></span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span class="hs-keyword">type</span><span> </span><span id="KeyCommand"><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyCommand"><span class="hs-identifier hs-var">KeyCommand</span></a></span></span><span> </span><span id="local-6989586621679092026"><span class="annot"><a href="#local-6989586621679092026"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span id="local-6989586621679092025"><span class="annot"><a href="#local-6989586621679092025"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span id="local-6989586621679092024"><span class="annot"><a href="#local-6989586621679092024"><span class="hs-identifier hs-type">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-type">KeyMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092026"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092025"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092024"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Class.html#MonadTrans"><span class="hs-identifier hs-type">MonadTrans</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-type">CmdM</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-83"></span><span>    </span><span id="local-6989586621679092017"><span class="annot"><span class="annottext">lift :: forall (m :: * -&gt; *) a. Monad m =&gt; m a -&gt; CmdM m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var hs-var hs-var hs-var">lift</span></a></span></span><span> </span><span id="local-6989586621679092015"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679092015"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (CmdM m a) -&gt; CmdM m a
forall (m :: * -&gt; *) a. m (CmdM m a) -&gt; CmdM m a
</span><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-var">CmdM</span></a></span><span> </span><span class="annot"><span class="annottext">(m (CmdM m a) -&gt; CmdM m a) -&gt; m (CmdM m a) -&gt; CmdM m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-84"></span><span>        </span><span id="local-6989586621679092014"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679092014"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679092015"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-85"></span><span>        </span><span class="annot"><span class="annottext">CmdM m a -&gt; m (CmdM m a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CmdM m a -&gt; m (CmdM m a)) -&gt; CmdM m a -&gt; m (CmdM m a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; CmdM m a
forall (m :: * -&gt; *) a. a -&gt; CmdM m a
</span><a href="System.Console.Haskeline.Command.html#Result"><span class="hs-identifier hs-var">Result</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679092014"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span id="local-6989586621679092262"><span id="local-6989586621679092263"><span id="local-6989586621679092264"><span class="annot"><a href="System.Console.Haskeline.Command.html#keyCommand"><span class="hs-identifier hs-type">keyCommand</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyCommand"><span class="hs-identifier hs-type">KeyCommand</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092264"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092263"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092262"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092264"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092263"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092262"><span class="hs-identifier hs-type">t</span></a></span></span></span></span><span>
</span><span id="line-88"></span><span id="keyCommand"><span class="annot"><span class="annottext">keyCommand :: forall (m :: * -&gt; *) s t. KeyCommand m s t -&gt; Command m s t
</span><a href="System.Console.Haskeline.Command.html#keyCommand"><span class="hs-identifier hs-var hs-var">keyCommand</span></a></span></span><span> </span><span id="local-6989586621679092012"><span class="annot"><span class="annottext">KeyCommand m s t
</span><a href="#local-6989586621679092012"><span class="hs-identifier hs-var">km</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679092011"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679092011"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">KeyMap (CmdM m t) -&gt; CmdM m t
forall (m :: * -&gt; *) a. KeyMap (CmdM m a) -&gt; CmdM m a
</span><a href="System.Console.Haskeline.Command.html#GetKey"><span class="hs-identifier hs-var">GetKey</span></a></span><span> </span><span class="annot"><span class="annottext">(KeyMap (CmdM m t) -&gt; CmdM m t) -&gt; KeyMap (CmdM m t) -&gt; CmdM m t
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((s -&gt; CmdM m t) -&gt; CmdM m t)
-&gt; KeyCommand m s t -&gt; KeyMap (CmdM m t)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(s -&gt; CmdM m t) -&gt; s -&gt; CmdM m t
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679092011"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">KeyCommand m s t
</span><a href="#local-6989586621679092012"><span class="hs-identifier hs-var">km</span></a></span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span id="local-6989586621679092256"><span class="annot"><a href="System.Console.Haskeline.Command.html#useKey"><span class="hs-identifier hs-type">useKey</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Key.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092256"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-type">KeyMap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092256"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-91"></span><span id="useKey"><span class="annot"><span class="annottext">useKey :: forall a. Key -&gt; a -&gt; KeyMap a
</span><a href="System.Console.Haskeline.Command.html#useKey"><span class="hs-identifier hs-var hs-var">useKey</span></a></span></span><span> </span><span id="local-6989586621679092007"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679092007"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679092006"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679092006"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a
forall a. (Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a
</span><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-var">KeyMap</span></a></span><span> </span><span class="annot"><span class="annottext">((Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a)
-&gt; (Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679092005"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679092005"><span class="hs-identifier hs-var">k'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679092007"><span class="hs-identifier hs-var">k</span></a></span><span class="annot"><span class="annottext">Key -&gt; Key -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679092005"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">KeyConsumed a -&gt; Maybe (KeyConsumed a)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; KeyConsumed a
forall a. a -&gt; KeyConsumed a
</span><a href="System.Console.Haskeline.Command.html#Consumed"><span class="hs-identifier hs-var">Consumed</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679092006"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe (KeyConsumed a)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="hs-comment">-- TODO: could just be a monadic action that returns a Char.</span><span>
</span><span id="line-94"></span><span id="local-6989586621679092250"><span id="local-6989586621679092251"><span id="local-6989586621679092252"><span class="annot"><a href="System.Console.Haskeline.Command.html#useChar"><span class="hs-identifier hs-type">useChar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092252"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092251"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092250"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyCommand"><span class="hs-identifier hs-type">KeyCommand</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092252"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092251"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092250"><span class="hs-identifier hs-type">t</span></a></span></span></span></span><span>
</span><span id="line-95"></span><span id="useChar"><span class="annot"><span class="annottext">useChar :: forall (m :: * -&gt; *) s t.
(Char -&gt; Command m s t) -&gt; KeyCommand m s t
</span><a href="System.Console.Haskeline.Command.html#useChar"><span class="hs-identifier hs-var hs-var">useChar</span></a></span></span><span> </span><span id="local-6989586621679092002"><span class="annot"><span class="annottext">Char -&gt; Command m s t
</span><a href="#local-6989586621679092002"><span class="hs-identifier hs-var">act</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Key -&gt; Maybe (KeyConsumed (Command m s t)))
-&gt; KeyMap (Command m s t)
forall a. (Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a
</span><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-var">KeyMap</span></a></span><span> </span><span class="annot"><span class="annottext">((Key -&gt; Maybe (KeyConsumed (Command m s t)))
 -&gt; KeyMap (Command m s t))
-&gt; (Key -&gt; Maybe (KeyConsumed (Command m s t)))
-&gt; KeyMap (Command m s t)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679092001"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679092001"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679092001"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-96"></span><span>                    </span><span class="annot"><a href="System.Console.Haskeline.Key.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span id="local-6989586621679091999"><span class="annot"><span class="annottext">Modifier
</span><a href="#local-6989586621679091999"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Key.html#KeyChar"><span class="hs-identifier hs-type">KeyChar</span></a></span><span> </span><span id="local-6989586621679091997"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679091997"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isPrint"><span class="hs-identifier hs-var">isPrint</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679091997"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Modifier
</span><a href="#local-6989586621679091999"><span class="hs-identifier hs-var">m</span></a></span><span class="annot"><span class="annottext">Modifier -&gt; Modifier -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span class="annot"><span class="annottext">Modifier
</span><a href="System.Console.Haskeline.Key.html#noModifier"><span class="hs-identifier hs-var">noModifier</span></a></span><span>
</span><span id="line-97"></span><span>                        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">KeyConsumed (Command m s t) -&gt; Maybe (KeyConsumed (Command m s t))
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(KeyConsumed (Command m s t)
 -&gt; Maybe (KeyConsumed (Command m s t)))
-&gt; KeyConsumed (Command m s t)
-&gt; Maybe (KeyConsumed (Command m s t))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Command m s t -&gt; KeyConsumed (Command m s t)
forall a. a -&gt; KeyConsumed a
</span><a href="System.Console.Haskeline.Command.html#Consumed"><span class="hs-identifier hs-var">Consumed</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Command m s t
</span><a href="#local-6989586621679092002"><span class="hs-identifier hs-var">act</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679091997"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-98"></span><span>                    </span><span class="annot"><span class="annottext">Key
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (KeyConsumed (Command m s t))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span id="local-6989586621679092242"><span id="local-6989586621679092243"><span id="local-6989586621679092244"><span class="annot"><a href="System.Console.Haskeline.Command.html#withoutConsuming"><span class="hs-identifier hs-type">withoutConsuming</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092244"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092243"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092242"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyCommand"><span class="hs-identifier hs-type">KeyCommand</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092244"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092243"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092242"><span class="hs-identifier hs-type">t</span></a></span></span></span></span><span>
</span><span id="line-101"></span><span id="withoutConsuming"><span class="annot"><span class="annottext">withoutConsuming :: forall (m :: * -&gt; *) s t. Command m s t -&gt; KeyCommand m s t
</span><a href="System.Console.Haskeline.Command.html#withoutConsuming"><span class="hs-identifier hs-var hs-var">withoutConsuming</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Key -&gt; Maybe (KeyConsumed (Command m s t)))
-&gt; KeyMap (Command m s t)
forall a. (Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a
</span><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-var">KeyMap</span></a></span><span> </span><span class="annot"><span class="annottext">((Key -&gt; Maybe (KeyConsumed (Command m s t)))
 -&gt; KeyMap (Command m s t))
-&gt; (Command m s t -&gt; Key -&gt; Maybe (KeyConsumed (Command m s t)))
-&gt; Command m s t
-&gt; KeyMap (Command m s t)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (KeyConsumed (Command m s t))
-&gt; Key -&gt; Maybe (KeyConsumed (Command m s t))
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe (KeyConsumed (Command m s t))
 -&gt; Key -&gt; Maybe (KeyConsumed (Command m s t)))
-&gt; (Command m s t -&gt; Maybe (KeyConsumed (Command m s t)))
-&gt; Command m s t
-&gt; Key
-&gt; Maybe (KeyConsumed (Command m s t))
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">KeyConsumed (Command m s t) -&gt; Maybe (KeyConsumed (Command m s t))
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(KeyConsumed (Command m s t)
 -&gt; Maybe (KeyConsumed (Command m s t)))
-&gt; (Command m s t -&gt; KeyConsumed (Command m s t))
-&gt; Command m s t
-&gt; Maybe (KeyConsumed (Command m s t))
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Command m s t -&gt; KeyConsumed (Command m s t)
forall a. a -&gt; KeyConsumed a
</span><a href="System.Console.Haskeline.Command.html#NotConsumed"><span class="hs-identifier hs-var">NotConsumed</span></a></span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span id="local-6989586621679092236"><span class="annot"><a href="System.Console.Haskeline.Command.html#choiceCmd"><span class="hs-identifier hs-type">choiceCmd</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-type">KeyMap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092236"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-type">KeyMap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092236"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-104"></span><span id="choiceCmd"><span class="annot"><span class="annottext">choiceCmd :: forall a. [KeyMap a] -&gt; KeyMap a
</span><a href="System.Console.Haskeline.Command.html#choiceCmd"><span class="hs-identifier hs-var hs-var">choiceCmd</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(KeyMap a -&gt; KeyMap a -&gt; KeyMap a)
-&gt; KeyMap a -&gt; [KeyMap a] -&gt; KeyMap a
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl"><span class="hs-identifier hs-var">foldl</span></a></span><span> </span><span class="annot"><span class="annottext">KeyMap a -&gt; KeyMap a -&gt; KeyMap a
forall {a}. KeyMap a -&gt; KeyMap a -&gt; KeyMap a
</span><a href="#local-6989586621679091990"><span class="hs-identifier hs-var">orKM</span></a></span><span> </span><span class="annot"><span class="annottext">KeyMap a
forall {a}. KeyMap a
</span><a href="#local-6989586621679091989"><span class="hs-identifier hs-var">nullKM</span></a></span><span>
</span><span id="line-105"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-106"></span><span>        </span><span id="local-6989586621679091989"><span class="annot"><span class="annottext">nullKM :: KeyMap a
</span><a href="#local-6989586621679091989"><span class="hs-identifier hs-var hs-var">nullKM</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a
forall a. (Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a
</span><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-var">KeyMap</span></a></span><span> </span><span class="annot"><span class="annottext">((Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a)
-&gt; (Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (KeyConsumed a) -&gt; Key -&gt; Maybe (KeyConsumed a)
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (KeyConsumed a)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-107"></span><span>        </span><span id="local-6989586621679091990"><span class="annot"><span class="annottext">orKM :: KeyMap a -&gt; KeyMap a -&gt; KeyMap a
</span><a href="#local-6989586621679091990"><span class="hs-identifier hs-var hs-var">orKM</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-type">KeyMap</span></a></span><span> </span><span id="local-6989586621679091986"><span class="annot"><span class="annottext">Key -&gt; Maybe (KeyConsumed a)
</span><a href="#local-6989586621679091986"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-type">KeyMap</span></a></span><span> </span><span id="local-6989586621679091985"><span class="annot"><span class="annottext">Key -&gt; Maybe (KeyConsumed a)
</span><a href="#local-6989586621679091985"><span class="hs-identifier hs-var">g</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a
forall a. (Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a
</span><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-var">KeyMap</span></a></span><span> </span><span class="annot"><span class="annottext">((Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a)
-&gt; (Key -&gt; Maybe (KeyConsumed a)) -&gt; KeyMap a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679091984"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679091984"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Maybe (KeyConsumed a)
</span><a href="#local-6989586621679091986"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679091984"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (KeyConsumed a)
-&gt; Maybe (KeyConsumed a) -&gt; Maybe (KeyConsumed a)
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a -&gt; m a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#mplus"><span class="hs-operator hs-var">`mplus`</span></a></span><span> </span><span class="annot"><span class="annottext">Key -&gt; Maybe (KeyConsumed a)
</span><a href="#local-6989586621679091985"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621679091984"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span id="local-6989586621679092224"><span id="local-6989586621679092225"><span id="local-6989586621679092226"><span class="annot"><a href="System.Console.Haskeline.Command.html#keyChoiceCmd"><span class="hs-identifier hs-type">keyChoiceCmd</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyCommand"><span class="hs-identifier hs-type">KeyCommand</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092226"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092225"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092224"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092226"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092225"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092224"><span class="hs-identifier hs-type">t</span></a></span></span></span></span><span>
</span><span id="line-110"></span><span id="keyChoiceCmd"><span class="annot"><span class="annottext">keyChoiceCmd :: forall (m :: * -&gt; *) s t. [KeyCommand m s t] -&gt; Command m s t
</span><a href="System.Console.Haskeline.Command.html#keyChoiceCmd"><span class="hs-identifier hs-var hs-var">keyChoiceCmd</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">KeyCommand m s t -&gt; Command m s t
forall (m :: * -&gt; *) s t. KeyCommand m s t -&gt; Command m s t
</span><a href="System.Console.Haskeline.Command.html#keyCommand"><span class="hs-identifier hs-var">keyCommand</span></a></span><span> </span><span class="annot"><span class="annottext">(KeyCommand m s t -&gt; Command m s t)
-&gt; ([KeyCommand m s t] -&gt; KeyCommand m s t)
-&gt; [KeyCommand m s t]
-&gt; Command m s t
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[KeyCommand m s t] -&gt; KeyCommand m s t
forall a. [KeyMap a] -&gt; KeyMap a
</span><a href="System.Console.Haskeline.Command.html#choiceCmd"><span class="hs-identifier hs-var">choiceCmd</span></a></span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span id="local-6989586621679092219"><span id="local-6989586621679092220"><span class="annot"><a href="System.Console.Haskeline.Command.html#keyChoiceCmdM"><span class="hs-identifier hs-type">keyChoiceCmdM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-type">KeyMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-type">CmdM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092220"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092219"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-type">CmdM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092220"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092219"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-113"></span><span id="keyChoiceCmdM"><span class="annot"><span class="annottext">keyChoiceCmdM :: forall (m :: * -&gt; *) a. [KeyMap (CmdM m a)] -&gt; CmdM m a
</span><a href="System.Console.Haskeline.Command.html#keyChoiceCmdM"><span class="hs-identifier hs-var hs-var">keyChoiceCmdM</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">KeyMap (CmdM m a) -&gt; CmdM m a
forall (m :: * -&gt; *) a. KeyMap (CmdM m a) -&gt; CmdM m a
</span><a href="System.Console.Haskeline.Command.html#GetKey"><span class="hs-identifier hs-var">GetKey</span></a></span><span> </span><span class="annot"><span class="annottext">(KeyMap (CmdM m a) -&gt; CmdM m a)
-&gt; ([KeyMap (CmdM m a)] -&gt; KeyMap (CmdM m a))
-&gt; [KeyMap (CmdM m a)]
-&gt; CmdM m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[KeyMap (CmdM m a)] -&gt; KeyMap (CmdM m a)
forall a. [KeyMap a] -&gt; KeyMap a
</span><a href="System.Console.Haskeline.Command.html#choiceCmd"><span class="hs-identifier hs-var">choiceCmd</span></a></span><span>
</span><span id="line-114"></span><span>
</span><span id="line-115"></span><span class="hs-keyword">infixr</span><span> </span><span class="hs-number">6</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#%3E%7C%3E"><span class="hs-operator hs-type">&gt;|&gt;</span></a></span><span>
</span><span id="line-116"></span><span id="local-6989586621679092213"><span id="local-6989586621679092214"><span id="local-6989586621679092215"><span id="local-6989586621679092216"><span class="annot"><a href="System.Console.Haskeline.Command.html#%3E%7C%3E"><span class="hs-operator hs-type">(&gt;|&gt;)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092216"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092216"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092215"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092214"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092216"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092214"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092213"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092216"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092215"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092213"><span class="hs-identifier hs-type">u</span></a></span></span></span></span></span><span>
</span><span id="line-117"></span><span id="local-6989586621679091981"><span class="annot"><span class="annottext">Command m s t
</span><a href="#local-6989586621679091981"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="%3E%7C%3E"><span class="annot"><span class="annottext">&gt;|&gt; :: forall (m :: * -&gt; *) s t u.
Monad m =&gt;
Command m s t -&gt; Command m t u -&gt; Command m s u
</span><a href="System.Console.Haskeline.Command.html#%3E%7C%3E"><span class="hs-operator hs-var hs-var">&gt;|&gt;</span></a></span></span><span> </span><span id="local-6989586621679091980"><span class="annot"><span class="annottext">Command m t u
</span><a href="#local-6989586621679091980"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679091979"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679091979"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Command m s t
</span><a href="#local-6989586621679091981"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679091979"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">CmdM m t -&gt; Command m t u -&gt; CmdM m u
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Command m t u
</span><a href="#local-6989586621679091980"><span class="hs-identifier hs-var">g</span></a></span><span>
</span><span id="line-118"></span><span>
</span><span id="line-119"></span><span class="hs-keyword">infixr</span><span> </span><span class="hs-number">6</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#%3E%2B%3E"><span class="hs-operator hs-type">&gt;+&gt;</span></a></span><span>
</span><span id="line-120"></span><span id="local-6989586621679092205"><span id="local-6989586621679092206"><span id="local-6989586621679092207"><span id="local-6989586621679092208"><span class="annot"><a href="System.Console.Haskeline.Command.html#%3E%2B%3E"><span class="hs-operator hs-type">(&gt;+&gt;)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092208"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyCommand"><span class="hs-identifier hs-type">KeyCommand</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092208"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092207"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092206"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092208"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092206"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092205"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyCommand"><span class="hs-identifier hs-type">KeyCommand</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092208"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092207"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092205"><span class="hs-identifier hs-type">u</span></a></span></span></span></span></span><span>
</span><span id="line-121"></span><span id="local-6989586621679091975"><span class="annot"><span class="annottext">KeyCommand m s t
</span><a href="#local-6989586621679091975"><span class="hs-identifier hs-var">km</span></a></span></span><span> </span><span id="%3E%2B%3E"><span class="annot"><span class="annottext">&gt;+&gt; :: forall (m :: * -&gt; *) s t u.
Monad m =&gt;
KeyCommand m s t -&gt; Command m t u -&gt; KeyCommand m s u
</span><a href="System.Console.Haskeline.Command.html#%3E%2B%3E"><span class="hs-operator hs-var hs-var">&gt;+&gt;</span></a></span></span><span> </span><span id="local-6989586621679091974"><span class="annot"><span class="annottext">Command m t u
</span><a href="#local-6989586621679091974"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Command m s t -&gt; Command m s u)
-&gt; KeyCommand m s t -&gt; KeyMap (Command m s u)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Command m s t -&gt; Command m t u -&gt; Command m s u
forall (m :: * -&gt; *) s t u.
Monad m =&gt;
Command m s t -&gt; Command m t u -&gt; Command m s u
</span><a href="System.Console.Haskeline.Command.html#%3E%7C%3E"><span class="hs-operator hs-var">&gt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Command m t u
</span><a href="#local-6989586621679091974"><span class="hs-identifier hs-var">g</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">KeyCommand m s t
</span><a href="#local-6989586621679091975"><span class="hs-identifier hs-var">km</span></a></span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span class="hs-comment">-- attempt to run the command (predicated on getting a valid key); but if it fails, just keep</span><span>
</span><span id="line-124"></span><span class="hs-comment">-- going.</span><span>
</span><span id="line-125"></span><span id="local-6989586621679092199"><span id="local-6989586621679092200"><span class="annot"><a href="System.Console.Haskeline.Command.html#try"><span class="hs-identifier hs-type">try</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092200"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyCommand"><span class="hs-identifier hs-type">KeyCommand</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092200"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092199"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092199"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092200"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092199"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092199"><span class="hs-identifier hs-type">s</span></a></span></span></span><span>
</span><span id="line-126"></span><span id="try"><span class="annot"><span class="annottext">try :: forall (m :: * -&gt; *) s.
Monad m =&gt;
KeyCommand m s s -&gt; Command m s s
</span><a href="System.Console.Haskeline.Command.html#try"><span class="hs-identifier hs-var hs-var">try</span></a></span></span><span> </span><span id="local-6989586621679091971"><span class="annot"><span class="annottext">KeyCommand m s s
</span><a href="#local-6989586621679091971"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[KeyCommand m s s] -&gt; Command m s s
forall (m :: * -&gt; *) s t. [KeyCommand m s t] -&gt; Command m s t
</span><a href="System.Console.Haskeline.Command.html#keyChoiceCmd"><span class="hs-identifier hs-var">keyChoiceCmd</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">KeyCommand m s s
</span><a href="#local-6989586621679091971"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Command m s s -&gt; KeyCommand m s s
forall (m :: * -&gt; *) s t. Command m s t -&gt; KeyCommand m s t
</span><a href="System.Console.Haskeline.Command.html#withoutConsuming"><span class="hs-identifier hs-var">withoutConsuming</span></a></span><span> </span><span class="annot"><span class="annottext">Command m s s
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span class="hs-keyword">infixr</span><span> </span><span class="hs-number">6</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#%2B%3E"><span class="hs-operator hs-type">+&gt;</span></a></span><span>
</span><span id="line-129"></span><span id="local-6989586621679091970"><span class="annot"><a href="System.Console.Haskeline.Command.html#%2B%3E"><span class="hs-operator hs-type">(+&gt;)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Key.html#Key"><span class="hs-identifier hs-type">Key</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679091970"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyMap"><span class="hs-identifier hs-type">KeyMap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679091970"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-130"></span><span id="%2B%3E"><span class="annot"><span class="annottext">+&gt; :: forall a. Key -&gt; a -&gt; KeyMap a
</span><a href="System.Console.Haskeline.Command.html#%2B%3E"><span class="hs-operator hs-var hs-var">(+&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Key -&gt; a -&gt; KeyMap a
forall a. Key -&gt; a -&gt; KeyMap a
</span><a href="System.Console.Haskeline.Command.html#useKey"><span class="hs-identifier hs-var">useKey</span></a></span><span>
</span><span id="line-131"></span><span>
</span><span id="line-132"></span><span id="local-6989586621679092194"><span id="local-6989586621679092195"><span class="annot"><a href="System.Console.Haskeline.Command.html#finish"><span class="hs-identifier hs-type">finish</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092195"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="System.Console.Haskeline.LineState.html#Result"><span class="hs-identifier hs-type">Result</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092194"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092195"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092194"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-133"></span><span id="finish"><span class="annot"><span class="annottext">finish :: forall (m :: * -&gt; *) s.
(Monad m, Result s) =&gt;
Command m s (Maybe String)
</span><a href="System.Console.Haskeline.Command.html#finish"><span class="hs-identifier hs-var hs-var">finish</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; CmdM m (Maybe String)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe String -&gt; CmdM m (Maybe String))
-&gt; (s -&gt; Maybe String) -&gt; s -&gt; CmdM m (Maybe String)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Maybe String) -&gt; (s -&gt; String) -&gt; s -&gt; Maybe String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">s -&gt; String
forall s. Result s =&gt; s -&gt; String
</span><a href="System.Console.Haskeline.LineState.html#toResult"><span class="hs-identifier hs-var">toResult</span></a></span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span id="local-6989586621679092187"><span id="local-6989586621679092188"><span id="local-6989586621679092189"><span class="annot"><a href="System.Console.Haskeline.Command.html#failCmd"><span class="hs-identifier hs-type">failCmd</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092189"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092189"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092188"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092187"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-136"></span><span id="failCmd"><span class="annot"><span class="annottext">failCmd :: forall (m :: * -&gt; *) s a. Monad m =&gt; Command m s (Maybe a)
</span><a href="System.Console.Haskeline.Command.html#failCmd"><span class="hs-identifier hs-var hs-var">failCmd</span></a></span></span><span> </span><span class="annot"><span class="annottext">s
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; CmdM m (Maybe a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span id="local-6989586621679092183"><span class="annot"><a href="System.Console.Haskeline.Command.html#effect"><span class="hs-identifier hs-type">effect</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Effect"><span class="hs-identifier hs-type">Effect</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#CmdM"><span class="hs-identifier hs-type">CmdM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092183"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-139"></span><span id="effect"><span class="annot"><span class="annottext">effect :: forall (m :: * -&gt; *). Effect -&gt; CmdM m ()
</span><a href="System.Console.Haskeline.Command.html#effect"><span class="hs-identifier hs-var hs-var">effect</span></a></span></span><span> </span><span id="local-6989586621679091962"><span class="annot"><span class="annottext">Effect
</span><a href="#local-6989586621679091962"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Effect -&gt; CmdM m () -&gt; CmdM m ()
forall (m :: * -&gt; *) a. Effect -&gt; CmdM m a -&gt; CmdM m a
</span><a href="System.Console.Haskeline.Command.html#DoEffect"><span class="hs-identifier hs-var">DoEffect</span></a></span><span> </span><span class="annot"><span class="annottext">Effect
</span><a href="#local-6989586621679091962"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">(CmdM m () -&gt; CmdM m ()) -&gt; CmdM m () -&gt; CmdM m ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">() -&gt; CmdM m ()
forall (m :: * -&gt; *) a. a -&gt; CmdM m a
</span><a href="System.Console.Haskeline.Command.html#Result"><span class="hs-identifier hs-var">Result</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span id="local-6989586621679091960"><span id="local-6989586621679091961"><span class="annot"><a href="System.Console.Haskeline.Command.html#clearScreenCmd"><span class="hs-identifier hs-type">clearScreenCmd</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679091961"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679091960"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679091960"><span class="hs-identifier hs-type">s</span></a></span></span></span><span>
</span><span id="line-142"></span><span id="clearScreenCmd"><span class="annot"><span class="annottext">clearScreenCmd :: forall (m :: * -&gt; *) a. a -&gt; CmdM m a
</span><a href="System.Console.Haskeline.Command.html#clearScreenCmd"><span class="hs-identifier hs-var hs-var">clearScreenCmd</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Effect -&gt; CmdM m s -&gt; CmdM m s
forall (m :: * -&gt; *) a. Effect -&gt; CmdM m a -&gt; CmdM m a
</span><a href="System.Console.Haskeline.Command.html#DoEffect"><span class="hs-identifier hs-var">DoEffect</span></a></span><span> </span><span class="annot"><span class="annottext">Effect
</span><a href="System.Console.Haskeline.Command.html#ClearScreen"><span class="hs-identifier hs-var">ClearScreen</span></a></span><span> </span><span class="annot"><span class="annottext">(CmdM m s -&gt; CmdM m s) -&gt; (s -&gt; CmdM m s) -&gt; s -&gt; CmdM m s
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">s -&gt; CmdM m s
forall (m :: * -&gt; *) a. a -&gt; CmdM m a
</span><a href="System.Console.Haskeline.Command.html#Result"><span class="hs-identifier hs-var">Result</span></a></span><span>
</span><span id="line-143"></span><span>
</span><span id="line-144"></span><span id="local-6989586621679092178"><span id="local-6989586621679092179"><span class="annot"><a href="System.Console.Haskeline.Command.html#simpleCommand"><span class="hs-identifier hs-type">simpleCommand</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.LineState.html#LineState"><span class="hs-identifier hs-type">LineState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092179"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092178"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679092179"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092178"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Effect"><span class="hs-identifier hs-type">Effect</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092179"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-145"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092178"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092179"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092179"><span class="hs-identifier hs-type">s</span></a></span></span></span><span>
</span><span id="line-146"></span><span id="simpleCommand"><span class="annot"><span class="annottext">simpleCommand :: forall s (m :: * -&gt; *).
(LineState s, Monad m) =&gt;
(s -&gt; m (Either Effect s)) -&gt; Command m s s
</span><a href="System.Console.Haskeline.Command.html#simpleCommand"><span class="hs-identifier hs-var hs-var">simpleCommand</span></a></span></span><span> </span><span id="local-6989586621679091950"><span class="annot"><span class="annottext">s -&gt; m (Either Effect s)
</span><a href="#local-6989586621679091950"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679091949"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679091949"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-147"></span><span>    </span><span id="local-6989586621679091948"><span class="annot"><span class="annottext">Either Effect s
</span><a href="#local-6989586621679091948"><span class="hs-identifier hs-var">et</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m (Either Effect s) -&gt; CmdM m (Either Effect s)
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; m (Either Effect s)
</span><a href="#local-6989586621679091950"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679091949"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-148"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either Effect s
</span><a href="#local-6989586621679091948"><span class="hs-identifier hs-var">et</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-149"></span><span>        </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679091947"><span class="annot"><span class="annottext">Effect
</span><a href="#local-6989586621679091947"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Effect -&gt; CmdM m ()
forall (m :: * -&gt; *). Effect -&gt; CmdM m ()
</span><a href="System.Console.Haskeline.Command.html#effect"><span class="hs-identifier hs-var">effect</span></a></span><span> </span><span class="annot"><span class="annottext">Effect
</span><a href="#local-6989586621679091947"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">CmdM m () -&gt; CmdM m s -&gt; CmdM m s
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">s -&gt; CmdM m s
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679091949"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-150"></span><span>        </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679091946"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679091946"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; CmdM m s
forall (m :: * -&gt; *) s. (Monad m, LineState s) =&gt; Command m s s
</span><a href="System.Console.Haskeline.Command.html#setState"><span class="hs-identifier hs-var">setState</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679091946"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span id="local-6989586621679092172"><span id="local-6989586621679092173"><span class="annot"><a href="System.Console.Haskeline.Command.html#charCommand"><span class="hs-identifier hs-type">charCommand</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.LineState.html#LineState"><span class="hs-identifier hs-type">LineState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092173"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092172"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092173"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092172"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Effect"><span class="hs-identifier hs-type">Effect</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092173"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-153"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyCommand"><span class="hs-identifier hs-type">KeyCommand</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092172"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092173"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092173"><span class="hs-identifier hs-type">s</span></a></span></span></span><span>
</span><span id="line-154"></span><span id="charCommand"><span class="annot"><span class="annottext">charCommand :: forall s (m :: * -&gt; *).
(LineState s, Monad m) =&gt;
(Char -&gt; s -&gt; m (Either Effect s)) -&gt; KeyCommand m s s
</span><a href="System.Console.Haskeline.Command.html#charCommand"><span class="hs-identifier hs-var hs-var">charCommand</span></a></span></span><span> </span><span id="local-6989586621679091941"><span class="annot"><span class="annottext">Char -&gt; s -&gt; m (Either Effect s)
</span><a href="#local-6989586621679091941"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Command m s s) -&gt; KeyCommand m s s
forall (m :: * -&gt; *) s t.
(Char -&gt; Command m s t) -&gt; KeyCommand m s t
</span><a href="System.Console.Haskeline.Command.html#useChar"><span class="hs-identifier hs-var">useChar</span></a></span><span> </span><span class="annot"><span class="annottext">((Char -&gt; Command m s s) -&gt; KeyCommand m s s)
-&gt; (Char -&gt; Command m s s) -&gt; KeyCommand m s s
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(s -&gt; m (Either Effect s)) -&gt; Command m s s
forall s (m :: * -&gt; *).
(LineState s, Monad m) =&gt;
(s -&gt; m (Either Effect s)) -&gt; Command m s s
</span><a href="System.Console.Haskeline.Command.html#simpleCommand"><span class="hs-identifier hs-var">simpleCommand</span></a></span><span> </span><span class="annot"><span class="annottext">((s -&gt; m (Either Effect s)) -&gt; Command m s s)
-&gt; (Char -&gt; s -&gt; m (Either Effect s)) -&gt; Char -&gt; Command m s s
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; m (Either Effect s)
</span><a href="#local-6989586621679091941"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-155"></span><span>
</span><span id="line-156"></span><span id="local-6989586621679092174"><span id="local-6989586621679092175"><span class="annot"><a href="System.Console.Haskeline.Command.html#setState"><span class="hs-identifier hs-type">setState</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092175"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="System.Console.Haskeline.LineState.html#LineState"><span class="hs-identifier hs-type">LineState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092174"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092175"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092174"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092174"><span class="hs-identifier hs-type">s</span></a></span></span></span><span>
</span><span id="line-157"></span><span id="setState"><span class="annot"><span class="annottext">setState :: forall (m :: * -&gt; *) s. (Monad m, LineState s) =&gt; Command m s s
</span><a href="System.Console.Haskeline.Command.html#setState"><span class="hs-identifier hs-var hs-var">setState</span></a></span></span><span> </span><span id="local-6989586621679091935"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679091935"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Effect -&gt; CmdM m ()
forall (m :: * -&gt; *). Effect -&gt; CmdM m ()
</span><a href="System.Console.Haskeline.Command.html#effect"><span class="hs-identifier hs-var">effect</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Effect
forall s. LineState s =&gt; s -&gt; Effect
</span><a href="System.Console.Haskeline.Command.html#lineChange"><span class="hs-identifier hs-var">lineChange</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679091935"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmdM m () -&gt; CmdM m s -&gt; CmdM m s
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">s -&gt; CmdM m s
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679091935"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-158"></span><span>
</span><span id="line-159"></span><span id="local-6989586621679092165"><span id="local-6989586621679092166"><span id="local-6989586621679092167"><span class="annot"><a href="System.Console.Haskeline.Command.html#change"><span class="hs-identifier hs-type">change</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.LineState.html#LineState"><span class="hs-identifier hs-type">LineState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092167"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092166"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679092165"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092167"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092166"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092165"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092167"><span class="hs-identifier hs-type">t</span></a></span></span></span></span><span>
</span><span id="line-160"></span><span id="change"><span class="annot"><span class="annottext">change :: forall t (m :: * -&gt; *) s.
(LineState t, Monad m) =&gt;
(s -&gt; t) -&gt; Command m s t
</span><a href="System.Console.Haskeline.Command.html#change"><span class="hs-identifier hs-var hs-var">change</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Command m t t
forall (m :: * -&gt; *) s. (Monad m, LineState s) =&gt; Command m s s
</span><a href="System.Console.Haskeline.Command.html#setState"><span class="hs-identifier hs-var">setState</span></a></span><span> </span><span class="annot"><span class="annottext">Command m t t -&gt; (s -&gt; t) -&gt; s -&gt; CmdM m t
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-161"></span><span>
</span><span id="line-162"></span><span id="local-6989586621679092159"><span id="local-6989586621679092160"><span id="local-6989586621679092161"><span class="annot"><a href="System.Console.Haskeline.Command.html#changeFromChar"><span class="hs-identifier hs-type">changeFromChar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.LineState.html#LineState"><span class="hs-identifier hs-type">LineState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092161"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092160"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092159"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092161"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyCommand"><span class="hs-identifier hs-type">KeyCommand</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092160"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092159"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092161"><span class="hs-identifier hs-type">t</span></a></span></span></span></span><span>
</span><span id="line-163"></span><span id="changeFromChar"><span class="annot"><span class="annottext">changeFromChar :: forall t (m :: * -&gt; *) s.
(LineState t, Monad m) =&gt;
(Char -&gt; s -&gt; t) -&gt; KeyCommand m s t
</span><a href="System.Console.Haskeline.Command.html#changeFromChar"><span class="hs-identifier hs-var hs-var">changeFromChar</span></a></span></span><span> </span><span id="local-6989586621679091926"><span class="annot"><span class="annottext">Char -&gt; s -&gt; t
</span><a href="#local-6989586621679091926"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Command m s t) -&gt; KeyCommand m s t
forall (m :: * -&gt; *) s t.
(Char -&gt; Command m s t) -&gt; KeyCommand m s t
</span><a href="System.Console.Haskeline.Command.html#useChar"><span class="hs-identifier hs-var">useChar</span></a></span><span> </span><span class="annot"><span class="annottext">((Char -&gt; Command m s t) -&gt; KeyCommand m s t)
-&gt; (Char -&gt; Command m s t) -&gt; KeyCommand m s t
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(s -&gt; t) -&gt; Command m s t
forall t (m :: * -&gt; *) s.
(LineState t, Monad m) =&gt;
(s -&gt; t) -&gt; Command m s t
</span><a href="System.Console.Haskeline.Command.html#change"><span class="hs-identifier hs-var">change</span></a></span><span> </span><span class="annot"><span class="annottext">((s -&gt; t) -&gt; Command m s t)
-&gt; (Char -&gt; s -&gt; t) -&gt; Char -&gt; Command m s t
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; t
</span><a href="#local-6989586621679091926"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-164"></span><span>
</span><span id="line-165"></span><span id="local-6989586621679092152"><span id="local-6989586621679092153"><span id="local-6989586621679092154"><span id="local-6989586621679092155"><span class="annot"><a href="System.Console.Haskeline.Command.html#doBefore"><span class="hs-identifier hs-type">doBefore</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092155"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#Command"><span class="hs-identifier hs-type">Command</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092155"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092154"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092153"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyCommand"><span class="hs-identifier hs-type">KeyCommand</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092155"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092153"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092152"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Command.html#KeyCommand"><span class="hs-identifier hs-type">KeyCommand</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092155"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092154"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092152"><span class="hs-identifier hs-type">u</span></a></span></span></span></span></span><span>
</span><span id="line-166"></span><span id="doBefore"><span class="annot"><span class="annottext">doBefore :: forall (m :: * -&gt; *) s t u.
Monad m =&gt;
Command m s t -&gt; KeyCommand m t u -&gt; KeyCommand m s u
</span><a href="System.Console.Haskeline.Command.html#doBefore"><span class="hs-identifier hs-var hs-var">doBefore</span></a></span></span><span> </span><span id="local-6989586621679091922"><span class="annot"><span class="annottext">Command m s t
</span><a href="#local-6989586621679091922"><span class="hs-identifier hs-var">cmd</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Command m t u -&gt; Command m s u)
-&gt; KeyMap (Command m t u) -&gt; KeyMap (Command m s u)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Command m s t
</span><a href="#local-6989586621679091922"><span class="hs-identifier hs-var">cmd</span></a></span><span> </span><span class="annot"><span class="annottext">Command m s t -&gt; Command m t u -&gt; Command m s u
forall (m :: * -&gt; *) s t u.
Monad m =&gt;
Command m s t -&gt; Command m t u -&gt; Command m s u
</span><a href="System.Console.Haskeline.Command.html#%3E%7C%3E"><span class="hs-operator hs-var">&gt;|&gt;</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-167"></span></pre></body></html>